/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yunhoo.sys.util.common;

import com.yunhoo.base.model.Department;
import com.yunhoo.base.model.Organization;
import com.yunhoo.base.model.Person;
import com.yunhoo.sys.login.LoginInfo;
import java.util.Date;

/**
 * 用于获取登录信息
 *
 * @author Administrator
 */
public class LoginParam {

    private static LoginInfo getLoginInfoBean() {
        LoginInfo loginInfo = (LoginInfo) FacesUtils.getManagedBean("loginInfo");
        return loginInfo;
    }

    public static Organization getOrg() {
        return getLoginInfoBean().getOrg();
    }

    public static Integer getIyear() {
        return getLoginInfoBean().getIyear();
    }

    public static Person getPer() {
        return getLoginInfoBean().getPer();
    }

    public static Department getDept() {
        return getLoginInfoBean().getDept();
    }

    public static Date getLoginDate() {
        return getLoginInfoBean().getLoginDate();
    }
}
